<template>
  <cost-consum-page
    :queryFormItem="queryFormItem"
    :collapseFormItem="collapseFormItem"
  />
</template>

<script>
import costConsumPage from '../components/costConsumPage.vue'
import mixin from "@/pages/components/mixins/mixin";

export default {
  components: { costConsumPage },
  mixins: [mixin],
  computed: {
    queryFormItem() {
      return [
        {
          key: "costType",
          title: {
            "zh-CN": "成本系数",
            "en-US": "costType",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          config: { type: "select", options: this.typeOptions },
        },
        {
          key: "batch",
          title: {
            "zh-CN": "批次",
            "en-US": "batch",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          config: { type: "text" },
        },
        {
          key: "specification",
          title: {
            "zh-CN": "规格",
            "en-US": "specification",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          config: { type: "text" },
        },
        {
          key: "timeRange",
          title: {
            "zh-CN": "时间区间",
            "en-US": "timeRange",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          config: { type: "datetimeRange" },
        },
      ];
    },
    collapseFormItem() {
      return [
        {
          key: "costType",
          title: {
            "zh-CN": "成本系数",
            "en-US": "costType",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          config: { type: "select", options: this.typeOptions },
        },
        {
          key: "batch",
          title: {
            "zh-CN": "批次",
            "en-US": "batch",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          config: { type: "text" },
        },
        {
          key: "specification",
          title: {
            "zh-CN": "规格",
            "en-US": "specification",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          config: { type: "text" },
        },
        {
          key: "timeRange",
          title: {
            "zh-CN": "时间区间",
            "en-US": "timeRange",
          }[this.G_Locale],
          minWidth: 100,
          align: "center",
          config: { type: "datetimeRange" },
        },
      ];
    }
  },
  data() {
    return {
      typeOptions: [
        { label: '金属量系数', value: 'metalFactor' },
        { label: '原料金属量系数', value: 'sourceMetalFactor' },
        { label: '化验费单价', value: 'laboratoryTestFee' },
        { label: '托盘单价', value: 'palletCost' },
        { label: '水费', value: 'waterRate' },
        { label: '电费', value: 'electricCharge' }
      ],
    }
  },
   methods: {

  }
}
</script>

<style scoped lang="scss">

</style>
